# -*- coding:utf-8 -*-
"""
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
"""
class Solution:
    def twoSum(self, nums, target):
        """
        :type nums: List[int]
        :type target: int
        :rtype: List[int]
        """
        for i in range(0,len(nums)):
            if target-nums[i] in nums:
                for j in range(0, len(nums)):
                    if nums[j] == target-nums[i] and j != i:
                        return [i, j]